import requests


class IhrmLogin(object):
    def login(self, json_data):
        resp = requests.post(url="http://ihrm2-test.itheima.net/api/sys/login", json=json_data)
        return resp


if __name__ == '__main__':
    ihrm_login = IhrmLogin()
    json_data = {"mobile": "13800000002", "password": "123456"}
    res = ihrm_login.login(json_data)
    print("登陆结果为:", res.json())
